package com.cinyi.ormx.android.db;
 
import android.content.Context;

import com.cinyi.ormx.android.dao.DefaultSQLiteHelper;
import com.cinyi.ormx.android.model.Tresource;
import com.cinyi.ormx.android.model.Tresourcetype;
import com.cinyi.ormx.android.model.Trole;
import com.cinyi.ormx.android.model.Tuser;

public class DbHelper  extends DefaultSQLiteHelper 
{	
	public static final int PAGE_ITEM = 20 ;
	private static byte[] lock = new byte[0];
	protected static String DB_NAME = "default.db";
	protected static int DB_VERSION = 3;
	
	public DbHelper(Context context)
    {
		super(context, DB_NAME, null, DB_VERSION ); 
		this.mContext = context ;
		
		initTables();
    }

	@Override
	public void initTables() {
		addTable(new Tresource());
		addTable(new Tresourcetype());
		addTable(new Trole());
		addTable(new Tuser());
	}

	@Override
	public String getDatabaseName() {
		return DB_NAME ;
	}
	
}
